$(function(){
	$('.pull-right input[name="submit"]').click(function(){
		var oName = $(':text[name="username"]').val();
		var oPassWord = $(':password[name="password"]').val();
		if(oName!=''&&oPassWord!=''){
			$.ajax({
				type : 'post',
				url : 'http://d1f5f69c.ngrok.io/system/login',
				data:{
					userName:oName,
					passWord:oPassWord
				},
				success : function(data){
					window.location.href="../html/inner0.html"
				},
				error : function(err){
					console.log(err);
				}
			})
		}else if(oName==''&&oPassWord!=''){
			$('.tips-name').css('display','block');
		}else if(oName!=''&&oPassWord==''){
			$('.tips-passwrad').css('display','block');
		}else{
			$('.tips-name').css('display','block');
			$('.tips-passwrad').css('display','block');
		}
		//console.log(oName);
		//console.log(oPassWord);
	});
});
